﻿@using MsForgeReboot.Framework.Entities
@using MsForgeReboot.Web.Extensions
@using PagedList
@using PagedList.Mvc
@model IPagedList<BlogPost>

@{
    ViewBag.Title = "Blog";
}

@Html.Partial("_PagedView", Model)

@foreach (var item in Model)
{
    <div class="blogPost-listItem">
        <h1>@Html.ActionLink(item.Title, "Post", new { urlPointer = item.UrlPointer })</h1>

        @Html.DisplaySummaryFor(item.Body) @Html.ActionLink("...", "Post", new { urlPointer = item.UrlPointer })

        <div>
            <span class="badge badge-success">Objavljeno: @Html.DisplayFor(modelItem => item.Published)</span>
            @*<span class="badge badge-success">@item.Comments.Count() komentara</span>*@
            <div class="pull-right"><span class="label">@Html.DisplayFor(modelItem => item.Author.PublicName)</span></div>
        </div>
    </div>
}

@Html.Partial("_PagedView", Model)